<section class="main_content board">
  <% @boards.each do |board| %>
    <article>
      <header>
        <p><%= board.ads.count %> <% if board.ads.count > 1 %>annonces <% else %> annonce <% end %></p>
        <h1><%= link_to board.label, board %></h1>
      </header>

      <% board.ads.each do |ad| %>

        <p><%= link_to ad.label, ad %></p>
        <p><%= image_tag ad.picture.url(:thumb) %></p>
        <p><%=t truncate(ad.description, :length => 200, :separator => ' ') %></p>

      <% end %>
    </article>
  <% end %>
</section>
